package Terminal.View;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;

import Terminal.View.Gestori.GestoreInterfaccia;
import Terminal.View.Gestori.GestoreTimeRecord;

public class JBottoniTask extends JPanel {
	protected JButton timerecords;
	protected GestoreTimeRecord mediator= GestoreTimeRecord.istanza();
	
	public JBottoniTask(){
		super();
		createComponents();
	}
	
	public void createComponents() {
		this.setBounds(20, 601, 1280, 80);
		this.setLayout(null);
		setTimerecors();
		//this.setBackground(Color.WHITE);
		add(timerecords);
		setVisible(true);
		
	}
	
	private void setTimerecors() {
		timerecords = new JButton("Timerecords");
		timerecords.setBounds(1130,15,150,50);//1080,20 , 200, 30);
		//timerecords.setFont(new Font( timerecords.getFont().getName(), Font.PLAIN, 16 ));
		
		timerecords.addActionListener(new ActionListener() {
			
			@Override
			public void actionPerformed(ActionEvent arg0) {
				mediator.smista("GestireTimeRecord", "VisualizzaTimeRecord");
				
			}
		});
		
		
	}

	public void setDisabilitaBottoni(boolean b) {
		timerecords.setEnabled(b);
		
	}

}
